<template>
  <div class="app">
    <h2>1. 遍历数组</h2>
    <!-- v-for = "(值，索引) in 遍历的数据"  key 是唯一的 string/number-->
    <p v-for="item in arrObj" v-bind:key="item.id">
      <input type="checkbox" name="" id="" />
      <span>---{{ item.name }}</span>
    </p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arrObj: [
        {
          id: 0,
          name: '柱子'
        },
        {
          id: 1,
          name: '邱邱'
        },
        {
          id: 2,
          name: '班长'
        }
      ]
    }
  }
}
</script>
<style lang="scss"></style>
